/**
 * Copyright 2016-2016 the original author or authors.
 * Created on 2016/12/8 下午7:50
 */
package com.mechanic.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.type.filter.RegexPatternTypeFilter;

import java.util.regex.Pattern;

/**
 * ROOT 上下文相关配置
 *
 * @author Mechanic
 * @version 1.0
 */
@Configuration
@ComponentScan(basePackages={"com.mechanic"},
  excludeFilters={
    @ComponentScan.Filter(type= FilterType.CUSTOM, value=RootConfig.WebPackage.class)
  })
public class RootConfig {
    static class WebPackage extends RegexPatternTypeFilter {
        public WebPackage() {
            super(Pattern.compile("com\\.mechanic"));
        }
    }
}
